package com.dev.ac.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.Date;

import lombok.Data;

/**
 * @TableName a_active
 */
@TableName(value = "a_active")
@Data
public class AActive implements Serializable {
	/**
	 *
	 */
	@TableId(type = IdType.AUTO)
	private Integer id;

	/**
	 * 活动名称
	 */
	private String activeName;
	private Integer adminId;

	/**
	 * 活动描述
	 */
	private String activeDescription;

	/**
	 * 活动内容
	 */
	private String activeContent;

	/**
	 * 活动类型：0-院级，1-校级，2-社团
	 */
	private Integer type;

	/**
	 * 活动分数
	 */
	private Double score;

	/**
	 * 活动类型-第二课堂分：0-没有，1-有
	 */
	private Integer secondScore;

	/**
	 * 活动类型-德育分：0-没有，1-有
	 */
	private Integer educationScore;

	/**
	 * 活动类型-劳动分：0-没有，1-有
	 */
	private Integer laborScore;

	/**
	 *
	 */
	private String acriveAddress;

	/**
	 * 报名时间
	 */
	private LocalDateTime createTime;

	/**
	 * 截止时间
	 */
	private LocalDateTime deadTime;

	/**
	 * 报名人数：0-所有
	 */
	private Long peopleCount;

	/**
	 * 状态：0-审核中，1-开始报名，2-截止报名，3-已结束
	 */
	private Integer status;

	/**
	 * 活动id
	 */
	private String activeId;
	private Integer isDelete;
	private String filePath;
	private String department;
	private Integer isAuthentic=0;

	@TableField(exist = false)
	private static final long serialVersionUID = 1L;
	@TableField(exist = false)
	private AAdmin aAdmin;
	@TableField(exist = false)
	private Long applicationCount;


	@Override
	public boolean equals(Object that) {
		if (this == that) {
			return true;
		}
		if (that == null) {
			return false;
		}
		if (getClass() != that.getClass()) {
			return false;
		}
		AActive other = (AActive) that;
		return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
				&& (this.getActiveName() == null ? other.getActiveName() == null : this.getActiveName().equals(other.getActiveName()))
				&& (this.getActiveDescription() == null ? other.getActiveDescription() == null : this.getActiveDescription().equals(other.getActiveDescription()))
				&& (this.getActiveContent() == null ? other.getActiveContent() == null : this.getActiveContent().equals(other.getActiveContent()))
				&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
				&& (this.getScore() == null ? other.getScore() == null : this.getScore().equals(other.getScore()))
				&& (this.getSecondScore() == null ? other.getSecondScore() == null : this.getSecondScore().equals(other.getSecondScore()))
				&& (this.getEducationScore() == null ? other.getEducationScore() == null : this.getEducationScore().equals(other.getEducationScore()))
				&& (this.getLaborScore() == null ? other.getLaborScore() == null : this.getLaborScore().equals(other.getLaborScore()))
				&& (this.getAcriveAddress() == null ? other.getAcriveAddress() == null : this.getAcriveAddress().equals(other.getAcriveAddress()))
				&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
				&& (this.getDeadTime() == null ? other.getDeadTime() == null : this.getDeadTime().equals(other.getDeadTime()))
				&& (this.getPeopleCount() == null ? other.getPeopleCount() == null : this.getPeopleCount().equals(other.getPeopleCount()))
				&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
				&& (this.getActiveId() == null ? other.getActiveId() == null : this.getActiveId().equals(other.getActiveId()));
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
		result = prime * result + ((getActiveName() == null) ? 0 : getActiveName().hashCode());
		result = prime * result + ((getActiveDescription() == null) ? 0 : getActiveDescription().hashCode());
		result = prime * result + ((getActiveContent() == null) ? 0 : getActiveContent().hashCode());
		result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
		result = prime * result + ((getScore() == null) ? 0 : getScore().hashCode());
		result = prime * result + ((getSecondScore() == null) ? 0 : getSecondScore().hashCode());
		result = prime * result + ((getEducationScore() == null) ? 0 : getEducationScore().hashCode());
		result = prime * result + ((getLaborScore() == null) ? 0 : getLaborScore().hashCode());
		result = prime * result + ((getAcriveAddress() == null) ? 0 : getAcriveAddress().hashCode());
		result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
		result = prime * result + ((getDeadTime() == null) ? 0 : getDeadTime().hashCode());
		result = prime * result + ((getPeopleCount() == null) ? 0 : getPeopleCount().hashCode());
		result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
		result = prime * result + ((getActiveId() == null) ? 0 : getActiveId().hashCode());
		return result;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append(getClass().getSimpleName());
		sb.append(" [");
		sb.append("Hash = ").append(hashCode());
		sb.append(", id=").append(id);
		sb.append(", activeName=").append(activeName);
		sb.append(", activeDescription=").append(activeDescription);
		sb.append(", activeContent=").append(activeContent);
		sb.append(", type=").append(type);
		sb.append(", score=").append(score);
		sb.append(", secondScore=").append(secondScore);
		sb.append(", educationScore=").append(educationScore);
		sb.append(", laborScore=").append(laborScore);
		sb.append(", acriveAddress=").append(acriveAddress);
		sb.append(", createTime=").append(createTime);
		sb.append(", deadTime=").append(deadTime);
		sb.append(", peopleCount=").append(peopleCount);
		sb.append(", status=").append(status);
		sb.append(", activeId=").append(activeId);
		sb.append(", serialVersionUID=").append(serialVersionUID);
		sb.append("]");
		return sb.toString();
	}
}